package com.sq.partner.manager.dao.credit;

import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.CreditPlan;
import com.sq.partner.manager.mybatis.model.NlifePlan;
import com.sq.partner.manager.mybatis.model.TradAgentInfo;
import com.sq.partner.manager.mybatis.model.TradAgentInfoRela;
import com.sq.partner.manager.mybatis.model.credit.credit10008;
import com.sq.partner.manager.util.Page;

public interface CreditPlanDao {
	/**
	 * 分页条件查询
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<Map<String,Object>> queryPageByCriteria(Page<Map<String,Object>> page) throws Exception;

	public credit10008 queryCustBy(credit10008 credit10008,String href) throws Exception;
	
	/**
	 * 新增方案，参数中不需传Insert_time(操作时间)，在该方法实现中为Insert_time赋值
	 * @return
	 * @throws Exception
	 */
	public boolean add(CreditPlan creditPlan) throws Exception;
	
	/**
	 * 更新方案，参数中不需传Insert_time(操作时间)，在该方法实现中为Insert_time赋值
	 * @return
	 * @throws Exception
	 */
	public boolean update(CreditPlan creditPlan) throws Exception;
	
	/**
	 * 根据plan_code查询对应方案
	 * @param plan_code
	 * @return
	 * @throws Exception
	 */
	public CreditPlan queryById(String plan_code) throws Exception;
	/**
	 * 查询方案号
	 * @param planStr
	 * @return
	 * @throws Exception
	 */
	public String queryNextPlanNo(String planStr) throws Exception ;
	
	/**
	 * 根据plan_code删除对应方案
	 * @param plan_code
	 * @return
	 * @throws Exception
	 */
	public boolean delById(String plan_code) throws Exception;
	
	public Page<Map<String, Object>> queryAgentInfoWithChannelPageByCriteria(Page<Map<String, Object>> page) throws Exception ;
	
	/**
	 * 根据prod_code查询对应方案
	 * @param prod_code
	 * @return
	 * @throws Exception
	 */
	public boolean queryByProdId(String prod_code) throws Exception;
	/**导出方案查询*/
	public List<CreditPlan> impCreditPlan(Map<String, Object>map) throws Exception;
}
